#----------------------------------------------------------------------
#
#  Copyright 2009, Thomas Dejanovic.
#
#  This is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation; either version 2.1 of
#  the License, or (at your option) any later version.
#
#  This software is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this software; if not, write to the Free
#  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
#  02110-1301 USA, or see the FSF site: http://www.fsf.org.
#
#----------------------------------------------------------------------
#
# This is a very simple sanity test for the Digilent S3 board.
#
#----------------------------------------------------------------------

cPack = Pack('cPack', comment="""This is the 4x7 segment display on the bottom right corner of the board. Values are desplayed in hex.""")

c3 = Register('c3', bit_width=4,  sw='rw', hw='ir')
cPack.childNodes.append(c3)

c2 = c3.copy(name='c2', parent=c3.parent) # Copy c3 and all it's childNodes recursively.  Name the new object 'c2', and set it's parent to cPack.
c1 = c3.copy('c1', c3.parent)
c0 = c3.copy('c0')  # parent defaults to None.
c0.parent = c3.parent


